﻿using System;
using System.Collections.Generic;
using Microsoft.WindowsAzure.StorageClient;

namespace Nardax.Azure.StorageClient
{
    public class CloudQueueWrapper : CloudQueueWrapperBase, ICloudQueue
    {
        /// <summary>
        /// Initializes a new instance of the CloudQueueWrapper class.
        /// </summary>
        /// <param name="cloudQueue">The cloud queue that this class is wrapping</param>
        public CloudQueueWrapper(CloudQueue cloudQueue)
            : base(cloudQueue)
        {
        }

        public void AddMessage(CloudQueueMessage message)
        {
            CloudQueue.AddMessage(message);
        }

        public void AddMessage(CloudQueueMessage message, TimeSpan timeToLive)
        {
            CloudQueue.AddMessage(message, timeToLive);
        }

        public CloudQueueMessage GetMessage()
        {
            return CloudQueue.GetMessage();
        }

        public CloudQueueMessage GetMessage(TimeSpan visibilityTimeout)
        {
            return CloudQueue.GetMessage(visibilityTimeout);
        }

        public IEnumerable<CloudQueueMessage> GetMessages(int messageCount)
        {
            return CloudQueue.GetMessages(messageCount);
        }

        public IEnumerable<CloudQueueMessage> GetMessages(int messageCount, TimeSpan visibilityTimeout)
        {
            return CloudQueue.GetMessages(messageCount, visibilityTimeout);
        }

        public CloudQueueMessage PeakMessage()
        {
            return CloudQueue.PeekMessage();
        }

        public IEnumerable<CloudQueueMessage> PeakMessages(int messageCount)
        {
            return CloudQueue.PeekMessages(messageCount);
        }
    }
}